Andrea Corallo [Mon, 8 Apr 2024 08:46:50 +0000 (10:46 +0200)]
* Fix out of date comp pass names in comp-tests.el
* test/src/comp-tests.el (comp-tests-tco, comp-tests-fw-prop-1)
(comp-tests-pure): Update out of date pass names.
Yuan Fu [Sun, 7 Apr 2024 22:59:48 +0000 (15:59 -0700)]
Document tree-sitter things feature (bug#70016) (bug#68824)
* doc/lispref/parsing.texi (Retrieving Nodes): Mention new kinds of
predicate argument that the tree-traversing functions accept (which are
thing symbols and thing definitions).
(User-defined Things): New node dedicated to thing definition and
navigation functions.
Yuan Fu [Sun, 7 Apr 2024 20:33:31 +0000 (13:33 -0700)]
Make tree-sitter thing feature public and remove obsolete functions
* lisp/treesit.el (treesit--things-around): Remove function.
(treesit-forward-sexp):
(treesit-beginning-of-thing):
(treesit-end-of-thing):
(treesit-navigate-thing):
(treesit-thing-at-point):
(treesit-outline-search): Use public version of thing-functions.
(treesit--thing-prev):
(treesit--thing-next):
(treesit--thing-at):
(treesit--navigate-thing): Make public.
* test/src/treesit-tests.el (treesit--ert-test-defun-navigation): Use
public version of thing-functions.
F. Jason Park [Sun, 31 Mar 2024 23:32:44 +0000 (16:32 -0700)]
Fix invisible erc-speedbar cursor in text terminals
* lisp/erc/erc-speedbar.el
(erc-speedbar--reset-last-ran-on-timer): Use `with-current-buffer'
instead of `setf' and `buffer-local-value'.
(erc-nickbar-mode, erc-nickbar-enable, erc-nickbar-disable)
(erc-speedbar-toggle-nicknames-window-lock): Revise doc string.
(erc-speedbar-toggle-nicknames-window-lock): Set `cursor-type' in
speedbar buffer.
(erc-nickbar-toggle-nicknames-window-lock): New function alias. Note
that this name flouts traditional library namespacing conventions.
* lisp/erc/erc-status-sidebar.el (erc-status-sidebar-get-window): Use
`cursor-type' instead of `internal-show-cursor'. (Bug#63595)
F. Jason Park [Mon, 1 Apr 2024 22:27:47 +0000 (15:27 -0700)]
Allow updating of /IGNORE timeouts in ERC
* lisp/erc/erc.el (erc--read-time-period, erc--decode-time-period):
Move body of former, now a superficial wrapper, to latter, a new
function.
(erc--format-time-period): New function.
(erc--get-ignore-timer-args): New function.
(erc--find-ignore-timer): New function to search through `timer-list'
to find matching ignore timer.
(erc-cmd-IGNORE): Refactor and redo doc string. Add new optional
`timespec' parameter, primarily to aid in testing. Update an existing
timer instead of always creating one, and display time remaining in
"ignore list" output. Pass server buffer instead of current buffer to
timer callbacks because `erc--unignore-user' displays its messages in
the `active' buffer, not necessarily the issuing one. Note that doing
this does discard potentially useful information, so if ever reverting,
we can change the `cl-find' :test in `erc--find-ignore-timer' to
something that compares the `erc-server-process' of both buffers.
;;
;; Something like:
;;
;; (defun erc--ignore-timers-equal-p (a b)
;; (and (equal (car a) (car b))
;; (eq (buffer-local-value 'erc-server-process (cadr a))
;; (buffer-local-value 'erc-server-process (cadr b)))))
;;
(erc-cmd-UNIGNORE): Pass `erc-ignore-list' member matching `user'
parameter to `erc--unignore-user' instead of original, raw parameter,
along with the server buffer.
(erc--unignore-user): Cancel existing timer and don't bother switching
to server buffer since we're already there.
(erc-message-english-ignore-list): New variable.
* test/lisp/erc/erc-scenarios-ignore.el: New file.
* test/lisp/erc/erc-tests.el (erc--read-time-period): New test.
(erc-cmd-UNIGNORE): New test. (Bug#70127)
F. Jason Park [Mon, 1 Apr 2024 15:14:52 +0000 (08:14 -0700)]
; * lisp/erc/erc-nicks.el: Fix typo in Commentary.
Stefan Monnier [Sun, 7 Apr 2024 18:16:38 +0000 (14:16 -0400)]
(Freplace_match): Fix bug#65451
* src/search.c (Freplace_match): For ordering of *-change-functions.
* test/src/editfns-tests.el
(editfns-tests--before/after-change-functions): New test.
(sanity-check--message, sanity-check-change-functions-error)
(sanity-check-change-functions-check-size)
(sanity-check-change-functions-before)
(sanity-check-change-functions-after): New functions.
(sanity-check--verbose, sanity-check-change-functions-beg)
(sanity-check-change-functions-end)
(sanity-check-change-functions-buffer-size)
(sanity-check-change-functions-errors): New vars.
Eli Zaretskii [Sun, 7 Apr 2024 09:08:18 +0000 (12:08 +0300)]
Fix truncation of long lines in compilation buffers
* lisp/progmodes/compile.el
(compilation--insert-abbreviated-line): Handle long lines that end
in a newline. (Bug#70236)
Arash Esbati [Sat, 6 Apr 2024 19:58:03 +0000 (21:58 +0200)]
Fix tex-tabbing-separator alignment rule
* lisp/align.el (align-rules-list): Remove the check of
`latex-mode' with `eq' which doesn't work with newer AUCTeX mode
names and modes defined by user with `define-derived-mode'.
(bug#69187)
Po Lu [Sun, 7 Apr 2024 06:39:42 +0000 (14:39 +0800)]
Resolve disagreements in accounting of tooltip positions on Android
* java/org/gnu/emacs/EmacsService.java (getLocationInWindow):
New function.
* java/org/gnu/emacs/EmacsWindow.java (translateCoordinates):
Derive "root window" position from the origin point of the
containing activity's window rather than that of the screen,
the two of which differ when "freeform mode" is enabled.
Lin Sun [Fri, 5 Apr 2024 06:58:07 +0000 (06:58 +0000)]
* lisp/el (master-says): Check nil argument (bug#70230).
Po Lu [Sun, 7 Apr 2024 04:15:39 +0000 (12:15 +0800)]
Port new Android window management strategy to Android 5.0
* doc/emacs/android.texi (Android Windowing): Revise to match.
* java/org/gnu/emacs/EmacsWindowManager.java (registerWindow)
(removeWindowConsumer, pruneWindows): Decrease minimum API for
monitoring of tasks to Android 5.0.
(getTaskToken): Ignore misleading documentation and access
baseIntent by way of RecentTaskInfo.
Juri Linkov [Sat, 6 Apr 2024 18:32:04 +0000 (21:32 +0300)]
; * etc/NEWS: Add entry about tab-bar-mode-map (bug#69578).
Eli Zaretskii [Sat, 6 Apr 2024 15:15:36 +0000 (11:15 -0400)]
; Commit autogenerated files.
Eli Zaretskii [Sat, 6 Apr 2024 15:13:35 +0000 (11:13 -0400)]
Merge from origin/emacs-29
3d87d74a23d ; * etc/PROBLEMS: Entry about slow mouse-wheel with GTK3 ...
c6899603b9c ; * doc/lispref/tips.texi (Documentation Tips): Improve (...
bd2c4d825db ; Update admin/make-tarball.txt
f107dc26e37 ; * etc/PROBLEMS: Add an entry about WebKitGTK (bug#66068).
Eli Zaretskii [Sat, 6 Apr 2024 15:13:35 +0000 (11:13 -0400)]
; Merge from origin/emacs-29
The following commit was skipped:
305e35b2d87 Adapt Tramp versio (don't merge)
Eli Zaretskii [Sat, 6 Apr 2024 15:13:34 +0000 (11:13 -0400)]
Merge from origin/emacs-29
46b8746b38e Fix warning-suppress for list type "warning type"
910ea5f1e55 Make object init more robust (bug#69571)
Eli Zaretskii [Sat, 6 Apr 2024 10:43:50 +0000 (13:43 +0300)]
; Minor fixes of doc strings referencing keymaps.
* lisp/edmacro.el (edmacro-mode):
* lisp/info.el (Info-mouse-follow-nearest-node): Move the
reference to mode keymap from the first line. (Bug#70163)
Eli Zaretskii [Sat, 6 Apr 2024 10:31:06 +0000 (13:31 +0300)]
; * INSTALL: Mention installation without root access (bug#70071).
Eli Zaretskii [Sat, 6 Apr 2024 10:13:27 +0000 (13:13 +0300)]
; * doc/lispref/commands.texi (Focus Events): Fix markup of last change.
Jared Finder [Sat, 30 Mar 2024 20:14:43 +0000 (13:14 -0700)]
Add documentation for 'switch-window' event
* doc/lispref/commands.texi (Focus Events): Add
documentation for the structure of 'switch-window' events.
Make sure to be clear when referring to window system windows
vs Emacs windows.
* doc/lispref/windows.texi (Mouse Window Auto-selection):
Adding cross-reference to "Focus Events". (Bug#69915)
Olaf Rogalsky [Sat, 30 Mar 2024 16:00:51 +0000 (17:00 +0100)]
Support 'mouse-autoselect-window' in xterm-mouse
Generate select-window events, so that 'mouse-autoselect-window'
takes effect on TTY frames, when 'xterm-mouse-mode' is enabled.
* lisp/xt-mouse.el (xterm-mouse-translate-1):
If 'mouse-autoselect-window' is non-nil, add select-window
events to 'unread-command-events'. (Bug#69915)
Eli Zaretskii [Sat, 6 Apr 2024 09:14:26 +0000 (12:14 +0300)]
; * etc/PROBLEMS: Entry about slow mouse-wheel with GTK3 (bug#70002).
Po Lu [Sat, 6 Apr 2024 03:17:49 +0000 (11:17 +0800)]
Correct typos in and omissions from earlier Android port changes
* java/AndroidManifest.xml.in: Remove duplicate permissions.
* java/org/gnu/emacs/EmacsWindowManager.java
(removeWindowConsumer): Disregard isFinishing for non-initial
activities.
Stefan Monnier [Fri, 5 Apr 2024 22:29:16 +0000 (18:29 -0400)]
(help-fns-function-description-header): Fix last change (bug#70209)
* lisp/help-fns.el (help-fns-function-description-header): Don't make
a button for the type if it's not a type.
Michael Albinus [Fri, 5 Apr 2024 17:43:56 +0000 (19:43 +0200)]
Make sh-script-tests.el more robust
* test/lisp/progmodes/sh-script-tests.el (test-sh-script-indentation)
(test-basic-sh-indentation, test-indent-after-continuation):
* test/lisp/progmodes/sh-script-resources/sh-indents.erts (Code):
Skip if `sh-indent-supported-here' is nil. (Bug#70196)
Juri Linkov [Fri, 5 Apr 2024 16:44:52 +0000 (19:44 +0300)]
Mark display-comint-buffer-action as obsolete after adding a category.
* lisp/window.el (display-comint-buffer-action):
Append '(category . comint)' to the default value. Mark as obsolete.
(display-tex-shell-buffer-action):
Append '(category . tex-shell)' to the default value. Mark as obsolete.
(bug#69983)
Juri Linkov [Fri, 5 Apr 2024 16:27:45 +0000 (19:27 +0300)]
; Use two dashes for internal function minibuffer-visible-completions--bind
* lisp/minibuffer.el (minibuffer-visible-completions--bind):
Rename from minibuffer-visible-completions-bind.
(minibuffer-visible-completions-map): Rename
minibuffer-visible-completions-bind to
minibuffer-visible-completions--bind.
Juri Linkov [Fri, 5 Apr 2024 16:23:08 +0000 (19:23 +0300)]
* lisp/tab-bar.el (tab-bar-mode-map): New keymap (bug#69578).
(tab-bar-select-tab-modifiers): Call tab-bar--undefine-keys
before set-default in :set of defcustom.
(tab-bar--define-keys, tab-bar--undefine-keys):
Change keybindings in tab-bar-mode-map instead of the global map.
Move checking of global-key-binding to tab-bar-mode--tab-key-bind.
(tab-bar-mode--tab-key-bind): New internal function.
Mattias Engdegård [Fri, 5 Apr 2024 13:54:30 +0000 (15:54 +0200)]
Only call set-text-conversion-style if it exists
* lisp/auth-source.el (read-passwd): Guard call, as it was before the
code was moved here.
`set-text-conversion-style` is not present in all configurations.
Stefan Monnier [Fri, 5 Apr 2024 11:41:42 +0000 (07:41 -0400)]
* lisp/help-fns.el (help-fns-function-description-header): Fix bug#70209
Replace the whimsical "" default by something actually useful.
Basil L. Contovounesios [Thu, 4 Apr 2024 19:48:22 +0000 (21:48 +0200)]
; Fix indentation in last change to windows.texi.
Po Lu [Fri, 5 Apr 2024 07:04:09 +0000 (15:04 +0800)]
Enable relinquishing access to Android content directories
* doc/emacs/android.texi (Android Document Providers): Document
new command.
* java/org/gnu/emacs/EmacsService.java (relinquishUriRights):
New function.
* src/Makefile.in (SOME_MACHINE_OBJECTS): Add androidvfs.c.
* src/android.c (android_init_emacs_service): Link to new
function.
* src/android.h (struct android_emacs_service)
<relinquish_uri_rights>: New field.
* src/androidfns.c:
* src/androidvfs.c (android_saf_tree_name)
(android_saf_tree_opendir): Minor adjustments to commentary.
(Fandroid_relinquish_directory_access): New function.
(syms_of_androidvfs): Define new subr.
Po Lu [Fri, 5 Apr 2024 06:08:23 +0000 (14:08 +0800)]
Merge remote-tracking branch 'savannah/master' into master-android-1
Po Lu [Fri, 5 Apr 2024 06:07:44 +0000 (14:07 +0800)]
Print records inside data-debug
* lisp/cedet/data-debug.el
(data-debug-insert-stuff-record-button): New function.
(data-debug-thing-alist): Register new function.
Po Lu [Fri, 5 Apr 2024 05:54:07 +0000 (13:54 +0800)]
Define missing type in semantic/db-find.el
* lisp/cedet/semantic/db-find.el
(semanticdb-find-result-with-nil): New deftype.
Eli Zaretskii [Fri, 5 Apr 2024 05:45:44 +0000 (08:45 +0300)]
* lisp/hexl.el (hexl-mode): Fix doc string (bug#70163).
Po Lu [Fri, 5 Apr 2024 02:39:33 +0000 (10:39 +0800)]
Fix Semantic tag discovery when loading of unloaded files is suppressed
* lisp/cedet/semantic/db-find.el
(semanticdb-find-tags-by-name-method)
(semanticdb-find-tags-by-name-regexp-method)
(semanticdb-find-tags-for-completion-method)
(semanticdb-find-tags-by-class-method)
(semanticdb-find-tags-external-children-of-type-method)
(semanticdb-find-tags-subclasses-of-type-method)
(semanticdb-deep-find-tags-by-name-method)
(semanticdb-deep-find-tags-by-name-regexp-method)
(semanticdb-deep-find-tags-for-completion-method): Verify that
tags is bound before accessing it; this slot is unbound in
tables created for unloaded files when the `unloaded' throttle
is disabled.
Spencer Baugh [Fri, 5 Apr 2024 00:29:42 +0000 (03:29 +0300)]
(project-current): Fix the previous change
* lisp/progmodes/project.el (project-current):
Fix the previous change (bug#69584).
Mattias Engdegård [Thu, 4 Apr 2024 16:59:45 +0000 (18:59 +0200)]
; * lisp/auth-source.el: add declarations to silence compiler
Mattias Engdegård [Thu, 4 Apr 2024 13:48:09 +0000 (15:48 +0200)]
; * src/json.c: Comment correction
Michael Albinus [Thu, 4 Apr 2024 14:51:55 +0000 (16:51 +0200)]
Adapt treesitter tests for EMBA
* test/infra/Makefile.in (TREE-SITTER-FILES): Add js-tests.el and
python-tests.el, which don't follow test file name convention.
* test/infra/test-jobs.yml: Regenerate.
Eli Zaretskii [Thu, 4 Apr 2024 13:28:31 +0000 (16:28 +0300)]
; * doc/lispref/tips.texi (Documentation Tips): Improve (bug#70163).
Michael Albinus [Thu, 4 Apr 2024 13:24:15 +0000 (15:24 +0200)]
; * doc/misc/cl.texi (Function Bindings): Fix reference.
Michael Albinus [Thu, 4 Apr 2024 12:51:57 +0000 (14:51 +0200)]
Move read-passwd* to auth-source.el, avoiding compilation warnings
* lisp/simple.el (read-passwd*):
* lisp/subr.el (read-passwd*): Move definitions ...
* lisp/auth-source.el: ... here.
(icons): Require.
Eli Zaretskii [Thu, 4 Apr 2024 12:23:49 +0000 (15:23 +0300)]
; Update admin/make-tarball.txt
* admin/make-tarball.txt: Add text about preparing bundled
packages for an emergency release. Suggested by Michael Albinus
<michael.albinus@gmx.de>.
Mattias Engdegård [Thu, 4 Apr 2024 10:21:26 +0000 (12:21 +0200)]
* src/json.c (make_symset_table): Fix over-large allocation size.
We multiplied when we should have added. Oops.
Juri Linkov [Thu, 4 Apr 2024 06:21:01 +0000 (09:21 +0300)]
Disobey display actions while using switch-to-buffer on the tab-line
* lisp/tab-line.el (tab-line-select-tab-buffer)
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab): Let-bind
switch-to-buffer-obey-display-actions to nil around the call to
switch-to-buffer to restrain buffer switching in bounds of
the same window only (bug#69993).
Po Lu [Thu, 4 Apr 2024 05:52:52 +0000 (13:52 +0800)]
Remove redundant byte-swapping boundary
* src/sfnt.c (sfnt_read_OS_2_table):
* src/sfnt.h (struct sfnt_OS_2_table): Don't redundantly realign
after s_family_class.
Po Lu [Thu, 4 Apr 2024 01:53:07 +0000 (09:53 +0800)]
Avoid destroying windows after they are unmapped
* java/org/gnu/emacs/EmacsActivity.java (destroy): Detach from
current window before calling finish.
* java/org/gnu/emacs/EmacsWindow.java (reparentTo): Don't clear
attachment state here...
* java/org/gnu/emacs/EmacsWindowManager.java (detachWindow):
...but do so here instead.
Po Lu [Thu, 4 Apr 2024 00:32:49 +0000 (08:32 +0800)]
; * src/haikufns.c (syms_of_haikufns): Fix indentation.
Tor-björn Claesson [Wed, 3 Apr 2024 07:25:59 +0000 (10:25 +0300)]
New variable haiku-pass-control-tab-to-system
Allow passing C-TAB on to the Haiku operating system, fixing
window switching when an Emacs frame has focus (Bug#70138).
* src/haiku_support.cc (DispatchMessage): Conditionally pass
message to BWindow.
* src/haiku_support.h:
* src/haikufns.c (haiku_should_pass_control_tab_to_system): Add
variable haiku-pass-control-tab-to-system, and C function
haiku_should_pass_control_tab_to_system.
Co-authored-by: Po Lu <luangruo@yahoo.com>
Copyright-paperwork-exempt: yes
Juri Linkov [Wed, 3 Apr 2024 17:42:11 +0000 (20:42 +0300)]
Simplify tab-line-switch-to-prev-tab and tab-line-switch-to-next-tab.
* lisp/tab-line.el (tab-line-switch-to-prev-tab)
(tab-line-switch-to-next-tab): Use buffers instead of tabs.
Theodor Thornhill [Sat, 30 Mar 2024 19:52:41 +0000 (20:52 +0100)]
Don't use file-truepath in Eglot (bug#70036)
`file-truepath' is slow because of recursive calls and being implemented
in lisp. It seems to not be needed in eglot, but it is used behind the
scenes in `find-buffer-visiting', thus appearing in profiles. Moving
the implementation to a hash map will yield similar performance
benefits, but wouldn't require us to rewrite `file-truename' in C.
* lisp/progmodes/eglot.el (eglot-lsp-server): Convert 'managed-buffers'
to a hashmap.
(eglot-uri-to-path): Don't use file-truepath, as it is too slow to be
included in the hot path.
(eglot--on-shutdown): Use buffers from buffer map.
(eglot--managed-mode): Add buffer to map, rather than list. Also remove
it from the map on deactivation.
(eglot-handle-notification): Expose server and get buffer from the
buffer map.
Po Lu [Wed, 3 Apr 2024 12:43:42 +0000 (20:43 +0800)]
; * java/org/gnu/emacs/EmacsView.java (onKeyDown): Delete debugging code.
Po Lu [Wed, 3 Apr 2024 12:41:08 +0000 (20:41 +0800)]
Prevent detachWindow from deleting frames
* java/org/gnu/emacs/EmacsWindowManager.java (detachWindow):
Remove WINDOW from the window list prior to pruning.
Po Lu [Wed, 3 Apr 2024 12:33:58 +0000 (20:33 +0800)]
; * java/org/gnu/emacs/EmacsWindow.java (reparentTo): Typo.
Po Lu [Wed, 3 Apr 2024 12:30:18 +0000 (20:30 +0800)]
Revise android.texi to agree with last change
* doc/emacs/android.texi (Android Windowing): Revise to agree
with last change
Po Lu [Wed, 3 Apr 2024 12:29:10 +0000 (20:29 +0800)]
Better align Emacs window management with Android task lifecycles
* java/org/gnu/emacs/EmacsActivity.java (onCreate): Permit
overriding by child classes.
(onDestroy): Minor stylistic adjustments.
(getAttachmentToken): New function.
* java/org/gnu/emacs/EmacsMultitaskActivity.java (onCreate)
(getAttachmentToken): New functions.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow):
<attachmentToken, preserve, previouslyAttached>: New variables.
(onActivityDetached): Remove redundant isFinishing argument.
(reparentTo): Reset the foregoing fields before registering with
the window manager.
* java/org/gnu/emacs/EmacsWindowManager.java
(EmacsWindowManager): Rename from EmacsWindowAttachmentManager.
(WindowConsumer): New function getAttachmentToken.
(isWindowEligible): New function.
(registerWindowConsumer, registerWindow, removeWindowConsumer)
(detachWindow): Implement a new window management strategy on
API 29 and subsequent releases where both varieties of toplevel
window are permanently, except when reparented, bound to the
activities to which they attach, and Emacs establishes at
strategic junctures whether those activities remain present.
(getTaskToken, pruneWindows): New functions.
Mattias Engdegård [Wed, 3 Apr 2024 09:28:49 +0000 (11:28 +0200)]
Revert "Check if lexical-binding is enabled before warning"
This reverts commit
7de192680fdac6938f5704aea0310b85b0da9c5e.
The logic is wrong (bug#70068).
Mattias Engdegård [Wed, 3 Apr 2024 09:27:16 +0000 (11:27 +0200)]
Make lexical-binding cookie warning test more robust
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--lexical-binding-cookie):
Run with lexical-binding both on and off.
Philip Kaludercic [Tue, 2 Apr 2024 16:01:27 +0000 (18:01 +0200)]
Check if lexical-binding is enabled before warning
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Suppress "file
has no `lexical-binding' directive" is the variable is non-nil,
as is the case with 'lisp-interaction-mode'. (Bug#70068)
Mattias Engdegård [Wed, 3 Apr 2024 07:52:55 +0000 (09:52 +0200)]
; * src/json.c (json_parse_array): Remove unused variable.
Eshel Yaron [Wed, 3 Apr 2024 06:35:18 +0000 (08:35 +0200)]
; Autoload 'global-completion-preview-mode'
* lisp/completion-preview.el (global-completion-preview-mode):
Add autoload cookie.
Randy Taylor [Wed, 3 Apr 2024 01:29:55 +0000 (21:29 -0400)]
; * src/json.c (Fjson_insert): Fix typo in doc (bug#70156).
Eli Zaretskii [Tue, 2 Apr 2024 17:43:29 +0000 (20:43 +0300)]
; * src/json.c (Fjson_insert): Doc fix.
Juri Linkov [Tue, 2 Apr 2024 17:17:41 +0000 (20:17 +0300)]
New functions to set and use context of window points (bug#33871)
* lisp/dired.el (dired-mode): Set buffer-local
'window-point-context-set-function' to remember 'dired-filename'
or 'position' in the window with the Dired buffer.
Set buffer-local 'window-point-context-use-function' to restore
the remembered position of the window point.
* lisp/tab-bar.el (tab-bar--tab): Use window-point-context-set.
(tab-bar-select-restore-context): New user option.
(tab-bar-select-tab): Use window-point-context-use.
* lisp/window.el: Add '(context . writable)' to
'window-persistent-parameters'.
(window-point-context-set, window-point-context-use): New functions.
(window-point-context-set-default-function)
(window-point-context-use-default-function): New functions.
(window-point-context-set-function)
(window-point-context-use-function): New variables.
Mattias Engdegård [Tue, 2 Apr 2024 16:58:09 +0000 (18:58 +0200)]
Fix json-insert unibyte buffer bug (bug#70007)
Previously, a unibyte target buffer could be put in an incorrect state
if json-insert was used to insert non-ASCII characters.
* src/json.c (Fjson_insert): Simplify. Don't attempt to decode the data
being inserted: it is guaranteed to be correct UTF-8 and is correct for
both unibyte and multibyte buffers.
* test/src/json-tests.el (json-serialize/roundtrip)
(json-serialize/roundtrip-scalars): Extend tests.
Mattias Engdegård [Tue, 2 Apr 2024 15:51:38 +0000 (17:51 +0200)]
json-insert doc fixes
* src/json.c (Fjson_insert): Precise the behaviour when the current
buffer is multibyte and unibyte, respectively.
* doc/lispref/text.texi (Parsing JSON): Refer to the right function.
Juri Linkov [Tue, 2 Apr 2024 16:51:51 +0000 (19:51 +0300)]
New condition/action entry 'category' for 'display-buffer' (bug#69983)
* doc/lispref/windows.texi (Choosing Window): Provide an example
of using '(category . comint)' in the condition of 'display-buffer-alist'
and in the action of 'display-buffer'.
(Buffer Display Action Alists): Add a new action alist entry 'category'.
* lisp/subr.el (buffer-match-p): Add a new condition 'category'.
* lisp/window.el (display-buffer): Document a new action alist entry
'category'.
Mattias Engdegård [Mon, 1 Apr 2024 15:02:58 +0000 (17:02 +0200)]
Update JSON codec doc strings
* src/json.c (Fjson_serialize, Fjson_insert, Fjson_parse_string)
(Fjson_parse_buffer): Make the text more readable, fix minor
errors and avoid terminology confusion.
Mattias Engdegård [Mon, 1 Apr 2024 15:01:07 +0000 (17:01 +0200)]
; * src/json.c (json_parse_object): Call make_hash_table directly.
Mattias Engdegård [Mon, 1 Apr 2024 14:58:03 +0000 (16:58 +0200)]
Update JSON parser test and docs
* test/src/json-tests.el (json-parse-string/object):
Duplicated object keys are now retained in alist and plist output.
* etc/NEWS: Mention it.
Po Lu [Mon, 1 Apr 2024 14:46:19 +0000 (10:46 -0400)]
(scheme-syntax-propertize-sexp-comment): Allow `#;` in strings
* lisp/progmodes/scheme.el (scheme-syntax-propertize-sexp-comment):
Don't get confused by `#;` inside strings and (normal) comments.
(scheme-sexp-comment-syntax-table): Comment-out, unused.
Po Lu [Mon, 1 Apr 2024 13:12:49 +0000 (21:12 +0800)]
Correct custom type in tramp-androidsu.el
* lisp/net/tramp-androidsu.el (tramp-androidsu-remote-path): Set
type to '(repeat string).
Po Lu [Mon, 1 Apr 2024 13:12:19 +0000 (21:12 +0800)]
; json.c stylistic adjustments
* src/json.c (json_parse_string): Stylistic changes.
Mattias Engdegård [Mon, 1 Apr 2024 12:41:37 +0000 (14:41 +0200)]
; * doc/lispref/processes.texi: use @code for keywords in @table
See discussion in bug#69709.
Eli Zaretskii [Mon, 1 Apr 2024 12:24:47 +0000 (15:24 +0300)]
; * etc/PROBLEMS: Add an entry about WebKitGTK (bug#66068).
Eli Zaretskii [Mon, 1 Apr 2024 11:21:10 +0000 (14:21 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Zajcev Evgeny [Thu, 21 Mar 2024 14:47:29 +0000 (17:47 +0300)]
Add support for `ch' and `cw' dimension specifiers for images
* src/image.c (image_get_dimension, lookup_image): Handle `ch'
and `cw' dimension specifiers in addition to `em'.
* src/dispextern.h: Add new members `face_font_height' and
`face_font_width' to `struct image'.
* doc/lispref/display.texi (Image Descriptors): Document
`ch' and `cw'.
Mattias Engdegård [Mon, 1 Apr 2024 11:09:23 +0000 (13:09 +0200)]
* etc/NEWS: Mention a JSON codec improvement.
Vladimir Kazanov [Sun, 31 Mar 2024 17:32:59 +0000 (18:32 +0100)]
Fix symbol list matching regexps.
Fix symbol list matching regexp performance
Allow empty face lists, improve the face list matching regexp (see
discussion in Bug#69714) based on relint's comments, add tests:
* test/lisp/emacs-lisp/ert-font-lock-tests.el: Add tests.
* lisp/emacs-lisp/ert-font-lock.el: Fix regexps.
Mattias Engdegård [Sun, 31 Mar 2024 17:19:58 +0000 (19:19 +0200)]
Don't signal `json-end-of-file` for short nonempty bad JSON inputs
* src/json.c (json_parse_value): Generate a plain parse error.
* test/src/json-tests.el (json-parse-string/short): Adapt test.
Mattias Engdegård [Sun, 31 Mar 2024 13:00:00 +0000 (15:00 +0200)]
Faster JSON parsing
Speed up JSON parsing substantially by only UTF-8-parsing string
literals and only exactly once. Previously, json-parse-string always
first parsed the entire input and copied it to a new string, and then
validated each string literal twice.
We no longer create an extra new string when interning an alist key,
nor do we garble plist keys with Unicode characters.
* src/lread.c (intern_c_multibyte): New.
* src/json.c (json_encode): Remove.
(utf8_error): New.
(json_parse_string): Faster and more careful UTF-8 decoding.
Create and return a new multibyte string or symbol without extra
decoding. All callers adapted.
(Fjson_parse_string): Skip expensive input pre-decoding.
* test/src/json-tests.el (json-parse-string/object-unicode-keys)
(json-parse-string/short): New.
(json-parse-string/string, json-parse-string/invalid-unicode):
Adapt tests.
* etc/NEWS: Mentioned change in errors.
Mattias Engdegård [Sun, 31 Mar 2024 13:07:34 +0000 (15:07 +0200)]
Native JSON support is always available
* lisp/progmodes/sh-script.el (sh--json-read): Remove.
(sh-shellcheck-flymake): Call json-parse-buffer directly.
* test/src/json-tests.el: Don't check for function availability.
Mattias Engdegård [Sun, 31 Mar 2024 14:12:45 +0000 (16:12 +0200)]
Fix mutates-arguments warning for `sort`
* lisp/emacs-lisp/bytecomp.el (bytecomp--sort-call-in-place-p)
(bytecomp--mutargs-nconc, bytecomp--mutargs-sort): New.
(byte-compile-form, bytecomp--actually-important-return-value-p)
(mutating-fns):
Use a slightly more extendible scheme for specifying what arguments
a function mutates. Give `sort` special treatment.
Stefan Monnier [Mon, 1 Apr 2024 06:12:51 +0000 (02:12 -0400)]
(scheme-syntax-propertize-sexp-comment): Handle nested sexp-comments
Well, I'm not completely sure this will work right in all cases,
because I've been confused about this in the past.
It works in my test case, at least.
* lisp/progmodes/scheme.el (scheme-syntax-propertize-sexp-comment):
Look for nested `#;` and mark them appropriately.
Po Lu [Mon, 1 Apr 2024 06:04:56 +0000 (14:04 +0800)]
Fix androidsu's `make-process' file name handler
* lisp/net/tramp-androidsu.el
(tramp-androidsu-handle-make-process): Disable exec loader
around call to setuid su binary.
niceume [Sun, 24 Mar 2024 03:29:56 +0000 (12:29 +0900)]
(scheme-syntax-propertize-sexp-comment): Remove unused argument
* lisp/progmodes/scheme.el (scheme-syntax-propertize-sexp-comment):
Remove first arg, unused.
(scheme-syntax-propertize): Adjust calls accordingly.
niceume [Sun, 17 Mar 2024 00:12:32 +0000 (09:12 +0900)]
scheme.el: Enable dealing with regular expression literal
* lisp/progmodes/scheme.el (scheme-syntax-propertize-regexp): New function.
(scheme-syntax-propertize): Use it.
Po Lu [Mon, 1 Apr 2024 01:26:03 +0000 (09:26 +0800)]
Fix listing of Android root directory when it is accessible
* src/androidvfs.c (android_root_closedir, android_root_dirfd)
(android_root_opendir): Allocate an ersatz file descriptor even
if directory is non-NULL, so that at-funcs will properly return
file status for virtual files in the root directory.
Michael Albinus [Sun, 31 Mar 2024 17:59:58 +0000 (19:59 +0200)]
Fix wildcard signals in dbusbind.c
* src/dbusbind.c (xd_read_message_1): Handle registered signals
with wildcards. (Bug#69926)
Michael Albinus [Sun, 31 Mar 2024 12:21:58 +0000 (14:21 +0200)]
Adapt Tramp version integrated in Emacs 29.3
* lisp/net/trampver.el:
Adapt Tramp version integrated in Emacs 29.3.
Michael Albinus [Sun, 31 Mar 2024 12:13:14 +0000 (14:13 +0200)]
Adapt Tramp versio (don't merge)
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.6.3".
(customize-package-emacs-version-alist):
Adapt Tramp version integrated in Emacs 29.3.
Xuan Wang [Fri, 29 Mar 2024 00:34:23 +0000 (20:34 -0400)]
Fix warning-suppress for list type "warning type"
Per the documentation of 'warning-suppress-types' and the
implementation of 'warning-suppress-p', a warning type can
be either a symbol or a list of symbols. The previous
implementation could generate wrong 'warning-suppress-types':
old behavior:
type warning-suppress-types
pkg -> '((pkg)) Correct
(pkg subtype) -> '(((pkg subtype))) Incorrect
Now we check whether type is a cons cell first. (Should not
use listp here, as listp returns t for nil.)
new behavior:
type warning-suppress-types
pkg -> '((pkg)) Correct
(pkg subtype) -> '((pkg subtype)) Correct
* lisp/emacs-lisp/warnings.el (warnings-suppress): Fix saving
warning types in 'warning-suppress-types'. (Bug#70063)
Copyright-paperwork-exempt: yes
Theodor Thornhill [Sun, 31 Mar 2024 08:43:44 +0000 (10:43 +0200)]
Make object init more robust (bug#69571)
* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Make the
regex same as before, but conditionally check other heuristics rather
than crazy regex shenanigans.
Po Lu [Sun, 31 Mar 2024 07:33:40 +0000 (15:33 +0800)]
List special directories when reading root directory on Android
* src/androidvfs.c (root_vfs_ops): Substitute
android_root_opendir for android_root_opendir.
(struct android_root_vdir): New structure.
(root_fd, root_fd_references): New variables.
(android_root_readdir, android_root_closedir, android_root_dirfd)
(android_root_opendir): New functions.
(android_fstatat_1): Test provided fd against root_fd, and if
they match, prefix FILENAME with the name of the root directory.
* lisp/ls-lisp.el (ls-lisp-insert-directory): If d-f-a-a signals
an error while retrieving attributes, compile the alist of
directory contents by hand.
Eshel Yaron [Tue, 26 Mar 2024 21:34:51 +0000 (22:34 +0100)]
Add global minor mode 'global-completion-preview-mode'
This is a global variant of 'completion-preview-mode'.
* lisp/completion-preview.el (global-completion-preview-mode): New
global minor mode.
* doc/emacs/programs.texi (Symbol Completion): Document it.
* etc/NEWS: Announce it. (Bug#70010)
Eli Zaretskii [Sun, 31 Mar 2024 07:29:34 +0000 (10:29 +0300)]
Fix the new PEG library
* doc/lispref/peg.texi (Parsing Expression Grammars)
(PEX Definitions, Parsing Actions, Writing PEG Rules): Fix markup,
indexing, and wording.
* etc/NEWS: Fix wording of PEG entry.
* test/lisp/progmodes/peg-tests.el: Move from test/lisp/, to match
the directory of peg.el.
Eli Zaretskii [Sun, 31 Mar 2024 06:31:58 +0000 (09:31 +0300)]
; Another round of stylistic fixes in json.c
* src/json.c (json_parser_init, json_parse_object)
(json_parse_value, Fjson_parse_string, json_parse)
(json_create_float, json_create_integer, json_parse_args): Fix
whitespace and indentation.